/* eslint-disable */
import request from "@/request";

/** addGift POST /api/api/gift/add */
export async function addGiftUsingPost(
  body: API.Gift,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/api/gift/add", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** exchangeGift POST /api/api/gift/exchange */
export async function exchangeGiftUsingPost(
  body: API.GiftExchangeRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/api/gift/exchange", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** getExchangeRecords GET /api/api/gift/exchange/records */
export async function getExchangeRecordsUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getExchangeRecordsUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageExchangeRecord_>(
    "/api/api/gift/exchange/records",
    {
      method: "GET",
      params: {
        // pageNum has a default value: 1
        pageNum: "1",
        // pageSize has a default value: 10
        pageSize: "10",
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** updateExchangeStatus POST /api/api/gift/exchange/status */
export async function updateExchangeStatusUsingPost(
  body: API.ExchangeRecord,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/api/gift/exchange/status", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** listGifts GET /api/api/gift/list */
export async function listGiftsUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listGiftsUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageGift_>("/api/api/gift/list", {
    method: "GET",
    params: {
      // pageNum has a default value: 1
      pageNum: "1",
      // pageSize has a default value: 10
      pageSize: "10",
      ...params,
    },
    ...(options || {}),
  });
}
